<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link rel="stylesheet" href="styles/screen.css" type="text/css" />
		<link rel="stylesheet" href="styles/content.css" type="text/css" />
		<title>JavaScript Port Scanner version:0.1</title>
	</head>
	<body>

<div id="content">

<div id="post-javascript-port-scanner" class="post">
<h2>JavaScript Port Scanner</h2>
<p class="post-date">2006-11-21 23:35</p>
<p>Just a few days ago SPI Dynamics released a <a href="http://www.spidynamics.com/assets/documents/JSportscan.pdf">paper</a> on how to port scan and do other cool stuff with JavaScript. I sow the paper and I though that It is quite cool idea. Since I am kind of interested in the subject I decided to have a look and see what it is required to make a simple port scanner for JavaScript. I wanted to make my code small, cute and reusable. After a couple of hours fiddling around with IMG tags and other DOM element I came up with the following solution.</p>

<div class="message">
<p>The port scanner depends on speed and might not be accurate. Please adjust the timeout value.</p>
<p>It works very well on IE. Firefox does not allow connections to very low ports (43,21, etc). I haven&#8217;t tested it on other browsers.</p>
</div>

<form>
<label for="target">target</label><br/>
<input type="text" name="target" value="www.bupt.edu.cn"/><br/>
<label for="ports">ports</label><br/>
<input type="text" name="ports" value="80"/><br/>
<p>you can use sequence as well 80,81,8080, 1024</p>
<label for="timeout">timeout</label><br/>
<input type="text" name="timeout" value="1000"/><br/>
<label for="result">result</label><br/>

<textarea id="result" name="result" rows="7" cols="50"></textarea><br/>
<input class="button" type="button" value="scan" onClick="javascript:scan_with_form(this.form)"/>
</form>

<script src="js/portscanner.js" type="text/javascript"></script>
<script src="js/caller.js" type="text/javascript"></script>



</div>

</div>


	</body>
</html>